package com.pmsystem.dao;

import com.pmsystem.pojo.RoomKey;
import com.pmsystem.pojo.RoomKeyExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface RoomKeyMapper {
    long countByExample(RoomKeyExample example);

    int deleteByExample(RoomKeyExample example);

    int deleteByPrimaryKey(Integer keyId);

    int insert(RoomKey record);

    int insertSelective(RoomKey record);

    List<RoomKey> selectByExample(RoomKeyExample example);

    RoomKey selectByPrimaryKey(Integer keyId);

    int updateByExampleSelective(@Param("record") RoomKey record, @Param("example") RoomKeyExample example);

    int updateByExample(@Param("record") RoomKey record, @Param("example") RoomKeyExample example);

    int updateByPrimaryKeySelective(RoomKey record);

    int updateByPrimaryKey(RoomKey record);

    /**
     * 
     * <p>Title: CountRoomKey</p >  
     * <p>Description: 分页查询房间的钥匙数    </p >  
     * @author 泽强
     * @param map
     * @return 钥匙数、房间Id、房间名、房间所属用户的id和名字
     */
	List<Map<String, Object>> countRoomKey(Map<String, Object> map);

	/**
	 * 
	 * <p>Title: findRoomKey</p >  
	 * <p>Description: 按一定条件查询钥匙</p >  
	 * @author 泽强
	 * @param map
	 * @return 
	 */
	List<RoomKey> findRoomKey(Map<String, Object> map);

	/**
	 * 
	 * <p>Title: findRoomKeyAndRoomName</p >  
	 * <p>Description: 按一定条件查询钥匙 </p >  
	 * @author 泽强
	 * @param map
	 * @return  钥匙信息、房间Id、房间名、房间所属用户的id和名字
	 */
	List<Map<String , Object>> findRoomKeyAndRoomAndUser(Map<String, Object> map);
}